import { getbusinessPro} from '@/api/businessPro'
import { getbusAdd,getbusEdit, getbusDel,getBusSel,creatTomo } from '../../../api/businessPro'

export default {
  namespaced: true, // 封闭
  state: {
    busEdit:[]
  },
  mutations: {
    setbusEdit(state, data) {
      state.busEdit = data}
  },
  getters: {},
  actions: {
    async getbusinessPro(context, payload) {
      try {
        const { data } = await getbusinessPro(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async getbusAdd(context, payload) {
      try {
        const { data } = await getbusAdd(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async getbusEdit(context, payload) {
      try {
        const { data } = await getbusEdit(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async getbusDel(context, payload) {
      try {
        const { data } = await getbusDel(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async getBusSel(context, payload) {
      try {
        const { data } = await getBusSel(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },
    async creatTomo(context, payload) {
      try {
        const { data } = await creatTomo(payload)
        //console.log(data)
        return data
      } catch (err) {
        console.log(err)
      }
    },

}
}